<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>CSS 2D转换</title>
	<style>
		html, body {
			height: 100%;
		}

		body {
			margin: 0;
			padding: 0;
			background-color: #F7F7F7;
		}

		.layer {
			width: 400px;
			height: 400px;
			position: fixed;
			left: 50%;
			top: 50%;
			/*margin: -120px 0 0 -120px;*/
			background-color: green;

			/* margin-top: -200px;
			margin-left: -200px; */
			/* transform: translate(-200px, -200px); */


			/* -ms-transform: translate(-50%, -50%); */

			transform: translate(-50%, -50%);
		}
	</style>
</head>
<body>
	<div class="layer"></div>
</body>
</html>